package com.yanqu.road.entity.activity.langyabang.data;


import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.Map;

@FieldTypeAnnotation(tableName = "t_c_lang_ya_declare_war")
public class LangYaBangDeclareWarData extends DataObject {
    @FieldTypeAnnotation(desc = "活动id",select = true,update = true)
    private int activityId;
    @FieldTypeAnnotation(desc = "分组id",select = true,update = true)
    private int groupId;
    @FieldTypeAnnotation(desc = "宣战唯一id",update = true)
    private int declareWarUid;
    @FieldTypeAnnotation(desc = "发起宣战的商会id")
    private String attackUnionUid;
    @FieldTypeAnnotation(desc = "被打的商会id")
    private String defenseUnionUid;
    @FieldTypeAnnotation(desc = "被打的商会宣战时候的排名")
    private int defenseUnionRank;
    @FieldTypeAnnotation(desc = "开启宣战人")
    private long openUserId;
    @FieldTypeAnnotation(desc = "开启人剩余次数")
    private int openUserRemainTimes;
    @FieldTypeAnnotation(desc = "其他人剩余次数")
    private int otherUserRemainTimes;
    @FieldTypeAnnotation(desc = "是否结束 0否 1是")
    private int isOver;
    @FieldTypeAnnotation(desc = "被宣战所有人信息",saveJson = true)
    private Map<Long, LangYaBangBeDeclareWarUserData> beDeclareUserDataMap;
    @FieldTypeAnnotation(desc = "开启时间")
    private long openTime;


    public int getActivityId() {
        return activityId;
    }
    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public int getGroupId() {
        return groupId;
    }
    public void setGroupId(int groupId) {
        if (this.groupId != groupId) {
            this.groupId = groupId;
            setOp(DataStatus.Update);
        }
    }

    public int getDeclareWarUid() {
        return declareWarUid;
    }
    public void setDeclareWarUid(int declareWarUid) {
        if (this.declareWarUid != declareWarUid) {
            this.declareWarUid = declareWarUid;
            setOp(DataStatus.Update);
        }
    }

    public String getAttackUnionUid() {
        return attackUnionUid;
    }
    public void setAttackUnionUid(String attackUnionUid) {
        if (attackUnionUid == null){
            return;
        }
        if (this.attackUnionUid == null || !this.attackUnionUid.equals(attackUnionUid)) {
            this.attackUnionUid = attackUnionUid;
            setOp(DataStatus.Update);
        }
    }

    public String getDefenseUnionUid() {
        return defenseUnionUid;
    }
    public void setDefenseUnionUid(String defenseUnionUid) {
        if (defenseUnionUid == null){
            return;
        }
        if (this.defenseUnionUid == null || !this.defenseUnionUid.equals(defenseUnionUid)) {
            this.defenseUnionUid = defenseUnionUid;
            setOp(DataStatus.Update);
        }
    }

    public int getDefenseUnionRank() {
        return defenseUnionRank;
    }
    public void setDefenseUnionRank(int defenseUnionRank) {
        if (this.defenseUnionRank != defenseUnionRank) {
            this.defenseUnionRank = defenseUnionRank;
            setOp(DataStatus.Update);
        }
    }

    public long getOpenUserId() {
        return openUserId;
    }
    public void setOpenUserId(long openUserId) {
        if (this.openUserId != openUserId) {
            this.openUserId = openUserId;
            setOp(DataStatus.Update);
        }
    }

    public int getOpenUserRemainTimes() {
        return openUserRemainTimes;
    }
    public void setOpenUserRemainTimes(int openUserRemainTimes) {
        if (this.openUserRemainTimes != openUserRemainTimes) {
            this.openUserRemainTimes = openUserRemainTimes;
            setOp(DataStatus.Update);
        }
    }

    public int getOtherUserRemainTimes() {
        return otherUserRemainTimes;
    }
    public void setOtherUserRemainTimes(int otherUserRemainTimes) {
        if (this.otherUserRemainTimes != otherUserRemainTimes) {
            this.otherUserRemainTimes = otherUserRemainTimes;
            setOp(DataStatus.Update);
        }
    }

    public int getIsOver() {
        return isOver;
    }
    public void setIsOver(int isOver) {
        if (this.isOver != isOver) {
            this.isOver = isOver;
            setOp(DataStatus.Update);
        }
    }

    public java.util.Map<java.lang.Long, com.yanqu.road.entity.activity.langyabang.data.LangYaBangBeDeclareWarUserData> getBeDeclareUserDataMap() {
        return beDeclareUserDataMap;
    }
    public void setBeDeclareUserDataMap(java.util.Map<java.lang.Long, com.yanqu.road.entity.activity.langyabang.data.LangYaBangBeDeclareWarUserData> beDeclareUserDataMap) {
        if (null == beDeclareUserDataMap){
            return;
        }
        if (this.beDeclareUserDataMap == null || !this.beDeclareUserDataMap.equals(beDeclareUserDataMap)) {
            this.beDeclareUserDataMap = beDeclareUserDataMap;
            setOp(DataStatus.Update);
        }
    }

    public long getOpenTime() {
        return openTime;
    }
    public void setOpenTime(long openTime) {
        if (this.openTime != openTime) {
            this.openTime = openTime;
            setOp(DataStatus.Update);
        }
    }

}
